if (location.hostname=='twitter.com') {
  var t=$('textarea#status, textarea.twitter-anywhere-tweet-box-editor');
  var n=$('.screen-name:first, .tweet-user-block-screen-name:first, .tweet-screen-name:first').text();
  var b=$('.entry-content:first, .tweet-text:first').text();
  n=n.replace(/^@/,'');
  var r='RT @'+n+': '+b;
  if (t.length) {
    t.val(r);
  } else {
    location.href='http://twitter.com/home?status='+encodeURIComponent(r);
  }
} else {
  location.href='http://twitter.com/';
}